Micron Document
baubs git

Node / mirrors / respira / files / src / utils / cssVariables.ts

Displaying Raw • Download

src/utils/cssVariables.ts copilot/move-helper-functions-to-utils (7d8af876) Text, 550 B

/**
* Get CSS variable value from document root
*/
export function getCSSVariable(name: string): string {
return getComputedStyle(document.documentElement)
.getPropertyValue(name)
.trim();
}

/**
* Canvas color helpers
*/
export const canvasColors = {
grid: () => getCSSVariable("--color-canvas-grid"),
origin: () => getCSSVariable("--color-canvas-origin"),
hoop: () => getCSSVariable("--color-canvas-hoop"),
bounds: () => getCSSVariable("--color-canvas-bounds"),
position: () => getCSSVariable("--color-canvas-position"),
};

Served by rngit 1.3.3 - Generated in 0.03s